/*
 * @Description: 档案整编相关接口
 * @Author: Zzt
 * @Date: 2022-11-02 16:09:07
 * @LastEditTime: 2022-11-04 09:56:14
 */
import request from '@/utils/request';
import type { ICoordinate, IPageQuery } from '@/interfaces/global';

/* 文件合并 */
interface IFileMergeParams extends ICoordinate {
  commonParams: CommonParams;
  sourceEntryIdList: any[];
  targetEntryId: number;
}
export interface CommonParams {
  dbName: string;
}
export function fileMerge(data: IFileMergeParams) {
  return request({
    url: `/archive-arrangement/file-merge/`,
    method: 'post',
    data
  });
}
interface IToOtherFolderParams {
  atCode: number;
  atType: number;
  commonParams: CommonParams;
  sourceEntryIdList: any[];
  targetEntryId: number;
}
export function toOtherFolder(data: IToOtherFolderParams) {
  return request({
    url: `/archive-arrangement/to-other-folder/`,
    method: 'post',
    data
  });
}

/* 获取组内案卷 */
interface IIntraGroupEntryParams extends ICoordinate {
  commonParams: CommonParams;
  entryId: number;
}

export function intraGroupEntry(data: IPageQuery<IIntraGroupEntryParams>) {
  return request({
    url: `/archive-arrangement/intra-group-entry/`,
    method: 'post',
    data
  });
}
